<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/page/share/taglib.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>小说章节管理界面</title>
    
     <script type="text/javascript">
    	//到指定的分页页面
		function topage(page){
			var form = document.forms[0];
			form.page.value=page;
			form.submit();
		}
		function deletechpater(id){
			if(confirm("确认要删除？")){
				var form = document.forms[0];
				form.chapterid.value = id;
				form.action = "/control/book/chapter/deletechapter";
				form.submit();
			}

		}
	</script>
  </head>
  
  <body>
  	 <form action="/control/book/chapterlist" method="post">
  	 	<input type="hidden" name="page" value="1">
  	 	<input type="hidden" name="bookid" value="${bookid}">
  	 	<input type="hidden" name="bookname" value="${bookname}">
  	 	<input type="hidden" name="chapterid">
   		<table width="100%" align="center">
   			<tr>
	   			<td>
	   			标题或作者
	   			</td>
	   			<td>
	   				<input type="text" name="title" value="${title }"/>
	   			</td>
	   			<td>
	   				<input type="submit" value="查询"/>
	   			</td>
   			</tr>
   			<tr>
   			  <th>编号</th>
   			  <th>标题</th>
   			  <th>小说名称</th>
   			  <th>更新时间</th>
   			  <th>来源</th>
   			  <th>是否采集</th>
   			  <th width="10%">操作</th>
   			</tr>
   			
   			<c:forEach items="${pageView.records}" var="entry">
   			<tr align="center">
   			  
   			  <td>${entry.id }</td>
   			  <td>${entry.title }</td>
   			  <td>${bookname }</td>
   			  <td>${entry.updatetime }</td>
   			  <td>${entry.resourceUrl }</td>
   			  <td>${entry.iscollected }</td>
   			  <td>
   			  <a href="/control/book/editchapter?chapterid=${entry.id }&bookid=${bookid}&bookname=${bookname}">修改</a>
   			  <a href="javascript:void(0);" onclick="deletechpater('${entry.id}');">删除</a><br>
   			  </td>
   			</tr>
   			</c:forEach>
   			<tr>
   				<td colspan="9">
   					<%@ include file="/WEB-INF/page/share/fenye.jsp" %>
   				</td>
   			</tr>
   		</table>
   	 </form>
  </body>
</html>